package org.chen.common.model.travel;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("fy_store_travel_order")
@Schema(name = "StoreTravelOrder对象", description="(旅游)订单表")
public class StoreTravelOrder {

    @Schema(description = "订单ID")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    @Schema(description = "订单号")
    private String orderId;

    @Schema(description = "支付订单号")
    private String payId;

    @Schema(description = "支付链接")
    private String payUrl;

    @Schema(description = "用户id")
    private Integer uid;

    @Schema(description = "用户姓名")
    private String realName;

    @Schema(description = "用户电话")
    private String userPhone;

    @Schema(description = "用户邮箱")
    private String email;

    @Schema(description = "订单商品总数")
    private Integer totalNum;

    @Schema(description = "订单总价")
    private BigDecimal totalPrice;

    @Schema(description = "实际支付金额")
    private BigDecimal payPrice;

    @Schema(description = "支付状态")
    private Boolean paid = false;

    @Schema(description = "支付时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date payTime;

    @Schema(description = "支付方式")
    private String payType;

    @Schema(description = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

    @Schema(description = "订单状态（0：待使用；1：已使用，待评价；2：已完成；）")
    private Integer status;

    @Schema(description = "0 未退款 1 申请中 2 已退款 3 退款中")
    private Integer refundStatus;

    @Schema(description = "退款图片")
    private String refundReasonWapImg;

    @Schema(description = "退款用户说明")
    private String refundReasonWapExplain = "";

    @Schema(description = "前台退款原因")
    private String refundReasonWap = "";

    @Schema(description = "不退款的理由")
    private String refundReason = "";

    @Schema(description = "退款时间")
    private Date refundReasonTime;

    @Schema(description = "退款金额")
    private BigDecimal refundPrice;

    @Schema(description = "备注")
    private String mark;

    @Schema(description = "是否删除")
    private Boolean isDel;

    @Schema(description = "管理员备注")
    private String remark;

    @Schema(description = "支付渠道(1-H5,2-PC)")
    private Integer isChannel = 2;

    @Schema(description = "消息提醒")
    private Boolean isRemind;

    @Schema(description = "后台是否删除")
    private Boolean isSystemDel;

    @Schema(description = "更新时间")
    private Date updateTime;

    @Schema(description = "订单类型:0-普通订单")
    private Integer type = 0;

    @Schema(description = "商品总价")
    private BigDecimal proTotalPrice;

    @Schema(description = "版本")
    private Integer version;

    // 添加分片键
    @TableField(exist = false)
    private Long shardingId;

}
